Field of the Invention
The present invention relates to an information processing apparatus that is capable of reliably switching a session, a method of controlling the same, and a storage medium.
Description of the Related Art
Conventionally, there has been known an information processing apparatus that has an IP phone function and an IP fax function (see e.g. Japanese Patent Laid-Open Publication No. 2007-336161). The information processing apparatus disclosed in Japanese Patent Laid-Open Publication No. 2007-336161 is compatible with the communication protocol T.38 recommended by ITU-T that is one sector of International Telecommunication Union, and realizes high-speed fax communication.
The information processing apparatus compatible with the communication protocol T.38 sometimes performs IP fax communication using the IP fax function after the end of IP phone conversation using the IP phone function. In such a case, first, when the user enables the IP phone function of the information processing apparatus to perform IP phone conversation, the information processing apparatus sets a medium type indicating the type of communication to “audio” indicating voice data communication, based on SIP. Note that SIP is an abbreviation of Session Initiation Protocol. The information processing apparatus establishes a session for performing IP phone conversation (hereinafter referred to as the “audio session”). After that, before the IP phone conversation is terminated to start IP fax communication, the information processing apparatus changes the medium type from “audio” to “image” indicating image data communication or “application” indicating various data communication, based on SIP. By changing the medium type as described above, the information processing apparatus establishes a session for performing IP fax communication (hereinafter referred to as the “T.38 session”). To perform switching of a session, although not specified as a protocol of SIP, it is regarded as a de facto standard that a signal requesting switching of the session (hereinafter referred to as the “Re-INVITE signal”) is transmitted from an information processing apparatus at a receiving end of an IP phone call (hereinafter referred to as the “receiving-end apparatus”), and the transmitted Re-INVITE signal is received by an information processing apparatus at a transmitting end of the IP phone call (hereinafter referred to as the “transmitting-end apparatus”).
Incidentally, conventionally, the IP fax function of an information processing apparatus compatible with the communication protocol T.38 has been used mainly over an intranet, but in recent years, the IP fax function is used also over a public IP network, such as the NGN (Next Generation Network).
However, concerning an apparatus that transmits a Re-INVITE signal, there is neither requirements stipulated in the NGN nor a de facto standard. Therefore, there is a case where a receiving-end apparatus and a transmitting-end apparatus simultaneously transmit respective Re-INVITE signals. In this case, the respective Re-INVITE signals transmitted from the transmitting-end and receiving-end apparatuses collide with each other, which makes it impossible for each apparatus to receive the Re-INVITE signal intended therefor. As a consequence, switching of the audio session to the T.38 session sometimes fails.
Further, when the transmitting-end apparatus receives a Re-INVITE signal from the receiving-end apparatus during IP phone conversation, the session cannot be immediately switched because the transmitting-end apparatus is performing IP phone conversation. On the other hand, when the Re-INVITE signal is received from the receiving-end apparatus, if the transmitting-end apparatus sends a response to the effect that the session cannot be switched, to the receiving-end apparatus, this may cause a problem that it is impossible thereafter to switch the session between the transmitting-end apparatus and the receiving-end apparatus. In short, it is impossible to reliably switch the session.